package com.cande.loki.exercise.arth;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * @auther ROCK CODER
 * @DATE 2022/12/19 16:37
 * @Description
 */
public class ScannerTest {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int max = 0;

        List<Integer> logs =new ArrayList<Integer>();
        //100必须上报
        String str = sc.nextLine().toString();
        String[] array = str.split(" ");
        for(int i =0; i<array.length;i++){
            logs.add(Integer.parseInt(array[i]));
        }
        int curSum = 0;
        int preSum =0;
        int delScore =0;
        for(int  i =0; i<logs.size();i++){
            preSum = curSum;
            curSum += logs.get(i);
            if(curSum >= 100){
                curSum = 100;
                delScore  += preSum;
                max =  Math.max(max,curSum-delScore);
                break;
            }
            delScore  += preSum;
            max =  Math.max(max,curSum-delScore);
        }
        System.out.println(max);
    }
}
